<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MySQL Diff</title>
    <style>

        body {
        }

        div.main {
            width:86%;
            margin: auto;
        }

        /* Padding and font style */
        table td, table th {
            padding: 5px 10px;
            font-size: 12px;
            font-family: Verdana;
            color: #5b7da3;
            text-align: left;
        }

        .table2 {
            width: 60%;
            border-collapse: collapse;
            border: 1px solid #a8bfde;
        }

        .table {
            width: 100%;
            border-collapse: collapse;
            border-bottom-width: 1px;
            border-bottom-style: solid;
            border-bottom-color: #a8bfde;
        }

        .table tr {
            border-bottom-width: 1px;
            border-bottom-style: dotted;
            border-bottom-color: #a8bfde;
        }

        /* Border styles */
        .table tr th {
            border-top-width: 1px;
            border-top-style: solid;
            border-top-color: #a8bfde;
            border-bottom-width: 1px;
            border-bottom-style: solid;
            border-bottom-color: #a8bfde;
        }

        /* Padding and font style */
        .table td, .table th {
            padding: 5px 10px;
            font-size: 12px;
            font-family: Verdana;
            color: #5b7da3;
            text-align: left;
        }


        .table .add {
            background: rgb(230, 238, 214)
        }

        .table .modify {
            background: rgb(223, 216, 232)
        }

        .table .drop {
            background: rgb(238, 211, 210)
        }

        /* Diff */
        .diff-mark {
            color: rgb(76, 11, 159);
            font-weight: bold;
            visibility: hidden;
            padding: 5px 0;
        }
        /* Tooltip 文本 */
        .diff-tooltip {
            visibility: hidden;
            width: 120px;
            background-color: #fba863;
            color: #fff;
            text-align: center;
            padding: 5px 0;
            border-radius: 6px;
            min-height: 10px;

            /* 定位 */
            position: absolute;
            z-index: 1;
        }

        /* 鼠标移动上去后显示提示框 */
        .table td.diff {
            color: #fba863;
            font-weight: bold;
        }
        .table td.diff:hover .diff-tooltip {
            visibility: visible;
        }





    </style>
</head>
<body>

<div class="main">
    <table class="table2">
        <tr>
            <th>so</th>
            <td>localhost:3306/diff_db_01</td>
            <th>sn</th>
            <td>localhost:3306/diff_db_02</td>
        </tr>
        <tr>
            <th>日期</th>
            <td>2022-02-17</td>
            <th>版本</th>
            <th></th>
        </tr>
        <tr>
            <td colspan="4">共比较出差异表 <span>2</span> 张</td>
        </tr>
    </table>
</div>
<br>
<br>

<div class="main">
    <h3>新增表</h3>
    <div class="new-table">
        <h4>diff_db_01.user</h4>

        <h5>表信息</h5>
        <table class="table">
            <thead>
            <tr>
                <th width="20%">字符集</th>
                <th width="20%">排序规则</th>
                <th width="60%">注释</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>utf8</td>
                <td>utf8_general_ci</td>
                <td></td>
            </tr>
            </tbody>
        </table>


        <h5>字段</h5>
        <table class="table">
            <thead>
            <tr>
                <th width="10%">列名</th>
                <th width="10%">类型</th>
                <th width="10%">IS NULL</th>
                <th width="10%">默认值</th>
                <th width="10%">主键</th>
                <th width="30%">注释</th>
                <th width="30%">自增</th>
                <th width="20%">字符集</th>
                <th width="20%">排序规则</th>
                <th width="20%">EXTRA</th>
            </tr>
            </thead>

            <tbody>
            <tr>
                <td>ID</td>
                <td>int(11)</td>
                <td>NO</td>
                <td></td>
                <td>PRI</td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
            </tr>
            <tr>
                <td>NAME</td>
                <td>varchar(255)</td>
                <td>YES</td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td>utf8</td>
                <td>utf8_general_ci</td>
                <td></td>
            </tr>
            <tr>
                <td>SEX</td>
                <td>smallint(6)</td>
                <td>YES</td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
            </tr>
            </tbody>
        </table>

        <h5>索引</h5>
        <table class="table">
            <thead>
            <tr>
                <th width="10%">索引名称</th>
                <th width="10%">字段</th>
                <th width="10%">类型</th>
                <th width="10%">类型</th>
                <th width="10%">唯一索引</th>
            </tr>
            </thead>

            <tbody>
                <tr>
                    <td>PRIMARY</td>
                    <td>ID</td>
                    <td>BTREE</td>
                    <td></td>
                    <td>Y</td>
                </tr>
            </tbody>
        </table>
        <br>
    </div>
    
</div>

<br><br>

<div class="main">

    <div class="change-table">
        <h3>修改表</h3>
        
        <div >
            <h4>diff_db_01.user_01</h4>

            <h5>表信息</h5>
            <table class="table">
                <thead>
                <tr>
                    <th width="10%">字符集</th>
                    <th width="10%">排序规则</th>
                    <th width="60%">注释</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>
                        utf8  <span class="diff-tooltip">utf8</span>
                    </td>
                    <td class="diff">utf8_general_ci   <span class="diff-tooltip">utf8_bin</span></td>
                    <td>   <span class="diff-tooltip"></span></td>
                </tr>
                
                </tbody>
            </table>


            <h5>字段</h5>
            <table class="table">
                <thead>
                <tr>
                    <th width="10%">列名</th>
                    <th width="10%">类型</th>
                    <th width="10%">IS NULL</th>
                    <th width="10%">默认值</th>
                    <th width="10%">主键</th>
                    <th width="30%">注释</th>
                    <th width="30%">自增</th>
                    <th width="20%">字符集</th>
                    <th width="20%">排序规则</th>
                    <th width="20%">EXTRA</th>
                </tr>
                </thead>

                <tbody>
                
                    
                    
                    
                    <tr>
                        <td>ID</td>
                        <td>int(11)</td>
                        <td>NO</td>
                        <td></td>
                        <td>PRI</td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                
                    
                    
                    <tr class="modify">
                        <td >NAME<span class="diff-tooltip">NAME</span></td>
                        <td class="diff">varchar(100)<span class="diff-tooltip">varchar(255)</span></td>
                        <td>YES<span class="diff-tooltip">YES</span></td>
                        <td><span class="diff-tooltip"></span></td>
                        <td><span class="diff-tooltip"></span></td>
                        <td class="diff">姓名<span class="diff-tooltip"></span></td>
                        <td><span class="diff-tooltip">false</span></td>
                        <td>utf8<span class="diff-tooltip">utf8</span></td>
                        <td>utf8_general_ci<span class="diff-tooltip">utf8_general_ci</span></td>
                        <td><span class="diff-tooltip"></span></td>
                    </tr>
                    
                
                    <tr class="add">
                        <td>AGE</td>
                        <td>smallint(6)</td>
                        <td>YES</td>
                        <td></td>
                        <td></td>
                        <td>年龄</td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                    
                    
                    
                
                    <tr class="add">
                        <td>CLASS_ID</td>
                        <td>int(11)</td>
                        <td>YES</td>
                        <td></td>
                        <td>MUL</td>
                        <td>班级ID</td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                    
                    
                    
                
                    
                    <tr class="drop">
                        <td>SEX</td>
                        <td>smallint(6)</td>
                        <td>YES</td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                    
                    
                
                </tbody>

            </table>

            <h5>索引</h5>
            <table class="table">
                <thead>
                <tr>
                    <th width="10%">索引名称</th>
                    <th width="10%">字段</th>
                    <th width="10%">类型</th>
                    <th width="10%">类型</th>
                    <th width="10%">唯一索引</th>
                </tr>
                </thead>

                <tbody>
                
                <tr class="add">
                    <td>idx_CLASS_ID</td>
                    <td>CLASS_ID</td>
                    <td>BTREE</td>
                    <td></td>
                    <td></td>
                </tr>
                
                
                
                
                
                
                
                <tr>
                    <td>PRIMARY</td>
                    <td>ID</td>
                    <td>BTREE</td>
                    <td></td>
                    <td>Y</td>
                </tr>
                
                </tbody>
            </table>
            <br>
        </div>

        </div>

</div>


</body>
</html>